package com.sg.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.annotations.LikeFlag;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 备注：
1、目标周期阶段关联评价者，结合评价时段规则，生成评价任务；同理，生成填报任务。
2、目标周期阶段关联评价对象，生成汇报任务。

评价画像EVALUATION_PORTRAIT、评价对象EVALUATION_OBJECT、部门DEPARTMENT、部门个人INDUCTION_RECORD
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_evaluation_object_target_cycle")  //3-3-09被评对象目标周期表
public class OmsEvaluationObjectTargetCycle implements Serializable {

  @Serial
    private static final long serialVersionUID = 1L;

  /**
   * 是否有过程周期 TRUE:是 FALSE:否
   */
  @TableField(value = "have_process_cycle")
  @Schema(description = "是否有过程周期")
  private String haveProcessCycle;

  /**
   * 被评对象目标周期ID
   */
  @TableId(value = "eva_obj_target_cycle_id", type = IdType.ASSIGN_UUID)
  @NotNull(message = "evaObjTargetCycleId不能为空")
  private String evaObjTargetCycleId;

  /**
   * 汇报通过时间
   */
  @TableField(value = "report_update_time")
  @Schema(description = "汇报通过时间")
  private Date reportUpdateTime;

  /**
   * 被评对象目标周期标识
   */
  @TableField(value = "eva_obj_target_cycle_code")
  @Schema(description = "被评对象目标周期标识")
  @LikeFlag(likeType = "LIKE")
  private String evaObjTargetCycleCode;

  /**
   * 目标内容编号
   */
  @TableField(value = "target_content_number")
  @Schema(description = "目标内容编号")
  private String targetContentNumber;

  /**
   * 上级被评对象目标周期标识
   */
  @TableField(value = "parent_eva_obj_target_cycle_id")
  @Schema(description = "上级被评对象目标周期标识")
  private String parentEvaObjTargetCycleId;

  /**
   * 目标树排序
   */
  @TableField(value = "target_tree_order_number")
  @Schema(description = "目标树排序")
  private String targetTreeOrderNumber;

  /**
   * 周期排序
   */
  @TableField(value = "order_number")
  @NotNull(message = "周期排序不能为空")
  @Schema(description = "周期排序")
  private Long orderNumber;

  /**
   * 目标周期名称
   */
  @TableField(value = "target_cycle_name")
  @Schema(description = "目标周期名称")
  private String targetCycleName;

  /**
   * 冗余评价对象ID
   */
  @TableField(value = "evaluation_object_id")
  @Schema(description = "冗余评价对象ID")
  private String evaluationObjectId;

  /**
   * 目标周期简称
   */
  @TableField(value = "cyclel_alias")
  @Schema(description = "目标周期简称")
  @LikeFlag(likeType = "LIKE")
  private String cyclelAlias;

  /**
   * 相对上级排序
   */
  @TableField(value = "relative_order_number")
  @Schema(description = "相对上级排序")
  private Long relativeOrderNumber;

  /**
   * 被评对象内容表主键ID
   */
  @TableField(value = "eva_obj_entity_id")
  @NotNull(message = "被评对象内容表主键ID不能为空")
  @Schema(description = "被评对象内容表主键ID")
  private String evaObjEntityId;

  /**
   * 部门排序
   */
  @TableField(value = "duty_body_order_num")
  @Schema(description = "部门排序")
  private Long dutyBodyOrderNum;

  /**
   * 被评对象内容表类型编码 ORG_OR_DEPT:组织或部门 INTELLIGENT_HARDWARE_EQUIPMENT:智能硬件设备 OMS_ACHIEVEMENT:成果表 OMS_ACHIEVEMENT_TYPE:成果类型表 OMS_TARGET_CYCLE:目标周期表 OMS_EVALUATION_OBJECT_TARGET_CYCLE:被评对象目标周期表 OMS_TARGET:目标表 OMS_TARGET_CATEGORY:目标分类表 OMS_TARGET_OBJECTIVE:指标表 OMS_TASK:任务表 OMS_ORG_INDUCTION_RECORD:就职记录表 OMS_FRAMEWORK_ORIGINAL_ROLE_MEMBER:身份人员表 OMS_ORG_DEPT:部门表 OMS_BASE_HOST:宿主表 OMS_FRAMEWORK_SPACE:空间表 OMS_TSPE_CYCLE_STAGE_DATA:周期阶段资料记录 OMS_EVALUATION_TEMPLATE:评价模板 OMS_EVALUATION_PORTRAIT:评价画像表 OMS_ORG_POSITION:职务表 OMS_VIRTUAL_ORG_MEMBER:虚拟组织成员表 OMS_PLANNING:规划资料表 OMS_FRAMEWORK_USERS:个人账号表 OMS_EXECUTE_CYCLE_STAGE:执行周期阶段表 OMS_CONF_SCHEME:配置方案表 OMS_EVA_OBJ_TARGET_CYCLE_OSET:被评对象目标周期目标设置表 OMS_EVA_OBJ_TARGET_CYCLE_WEIGHT_SET:被评对象目标周期权重设置表 OMS_NOTICE:通知公告表 OMS_CYCLE:周期表 OMS_EVALUATION_SUBJECT:评价主题表 OMS_BIZ_APP_BATCH:业务应用批次表 OMS_EVA_BATCH_RELATED_SET:评价模板批次相关设置表 OMS_TARGET_CYCLE_PLAN_SET:目标周期规划设置表 OMS_TARGET_OBJECTIVE_PLAN_EXTEND:指标扩展规划设置表 OMS_MESSAGE_CHANNEL:通道表 OMS_ORG_ORGANIZATION:组织表 OMS_PROJECT:项目表 OMS_ORG_DEPT:部门表 OMS_QUESTION:问题表 OMS_OFFICIAL_DOCUMENT:公文表 OMS_VIRTUAL_ORG:虚拟组织表 OMS_MESSAGE:消息表 OMS_MESSAGE_LOCATION:消息位置表 OMS_MESSAGE_MEMBER:成员接收消息表 OMS_MESSAGE_MEMBER_CHANNEL_RELATION:成员通道关系表 OMS_FRAMEWORK_SPACE_MEMBER:成员表
   */
  @TableField(value = "eva_obj_table_type_code")
  @NotNull(message = "被评对象内容表类型编码不能为空")
  @Schema(description = "被评对象内容表类型编码")
  private String evaObjTableTypeCode;

  /**
   * 个人排序
   */
  @TableField(value = "personal_order_number")
  @Schema(description = "个人排序")
  private Long personalOrderNumber;

  /**
   * 被评对象类型编码 EVA_PORTRAIT:评价画像 EVA_OBJECT:评价对象 FLEVEL_OBJ_TASK_DUTY_DEPT:一级部门目标任务责任部门 OKR_SUBJECT_DEPT:OKR责任主体部门 OKR_SUBJECT_PERSONAL:OKR责任主体个人
   */
  @TableField(value = "eva_obj_type_code")
  @NotNull(message = "被评对象类型编码不能为空")
  @Schema(description = "被评对象类型编码")
  private String evaObjTypeCode;

  /**
   * 权重排序
   */
  @TableField(value = "weight_order_number")
  @Schema(description = "权重排序")
  private Long weightOrderNumber;

  /**
   * 树类型编码 PLAN_TREE:规划树 EVALUATION_TREE:评价树 DEP_OBJ_MIS_STA:部门目标任务书 DUTY_SUBJECT:OKR责任主体树
   */
  @TableField(value = "tree_type_code")
  @NotNull(message = "树类型编码不能为空")
  @Schema(description = "树类型编码")
  private String treeTypeCode;

  /**
   * 评价模板创建时间排序
   */
  @TableField(value = "sort_create_time")
  @NotNull(message = "评价模板创建时间排序不能为空")
  @Schema(description = "评价模板创建时间排序")
  private Date sortCreateTime;

  /**
   * 关联目标内容类型编码 TARGET:目标 TARGET_CATEGORY:目标分类 OBJECTIVE:指标
   */
  @TableField(value = "target_cycle_content_type_code")
  @NotNull(message = "关联目标内容类型编码不能为空")
  @Schema(description = "关联目标内容类型编码")
  private String targetCycleContentTypeCode;

  /**
   * 关联目标内容ID
   */
  @TableField(value = "target_cycle_content_id")
  @NotNull(message = "关联目标内容ID不能为空")
  @Schema(description = "关联目标内容ID")
  private String targetCycleContentId;

  /**
   * 是否目标 TRUE:是 FALSE:否
   */
  @TableField(value = "is_target")
  @NotNull(message = "是否目标不能为空")
  @Schema(description = "是否目标")
  private String isTarget;

  /**
   * OKR目标属性 OBJECTIVES:目标O KEY_RESULTS:关键成果KR
   */
  @TableField(value = "indicator_kind")
  @Schema(description = "OKR目标属性")
  private String indicatorKind;

  /**
   * 一级及以上指标数据 TRUE:是 FALSE:否
   */
  @TableField(value = "one_and_up_target_data")
  @Schema(description = "一级及以上指标数据")
  private String oneAndUpTargetData;

  /**
   * 是否自定义OKR目标 TRUE:是 FALSE:否
   */
  @TableField(value = "is_custom_objective")
  @Schema(description = "是否自定义OKR目标")
  private String isCustomObjective;

  /**
   * 是否用于一级部门 TRUE:是 FALSE:否
   */
  @TableField(value = "is_use_first_dept")
  @Schema(description = "是否用于一级部门")
  private String isUseFirstDept;

  /**
   * 权重分设置状态 CALCULATING:权重未设置 CALCULATE_COMPLETE:权重已设置
   */
  @TableField(value = "recalculate_weight_state")
  @Schema(description = "权重分设置状态")
  private String recalculateWeightState;

  /**
   * 关联末级目标分类ID
   */
  @TableField(value = "correlation_last_target_cat_id")
  @Schema(description = "关联末级目标分类ID")
  private String correlationLastTargetCatId;

  /**
   * 周期ID
   */
  @TableField(value = "cycle_id")
  @NotNull(message = "周期ID不能为空")
  @Schema(description = "周期ID")
  private String cycleId;

  /**
   * 周期名称
   */
  @TableField(value = "cycle_standard_name")
  @NotNull(message = "周期名称不能为空")
  @Schema(description = "周期名称")
  private String cycleStandardName;

  /**
   * 是否父周期 TRUE:是 FALSE:否
   */
  @TableField(value = "is_parent_cycle")
  @NotNull(message = "是否父周期不能为空")
  @Schema(description = "是否父周期")
  private String isParentCycle;

  /**
   * 是否中期 TRUE:是 FALSE:否
   */
  @TableField(value = "is_metaphase")
  @NotNull(message = "是否中期不能为空")
  @Schema(description = "是否中期")
  private String isMetaphase;

  /**
   * 是否子周期 TRUE:是 FALSE:否
   */
  @TableField(value = "is_sub_cycle")
  @NotNull(message = "是否子周期不能为空")
  @Schema(description = "是否子周期")
  private String isSubCycle;

  /**
   * 目标计划开始时间
   */
  @TableField(value = "cycle_start_time")
  @NotNull(message = "目标计划开始时间不能为空")
  @Schema(description = "目标计划开始时间")
  private Date cycleStartTime;

  /**
   * 目标计划结束时间
   */
  @TableField(value = "cycle_end_time")
  @NotNull(message = "目标计划结束时间不能为空")
  @Schema(description = "目标计划结束时间")
  private Date cycleEndTime;

  /**
   * 周期类型标识
   */
  @TableField(value = "cycle_type_code")
  @NotNull(message = "周期类型标识不能为空")
  @Schema(description = "周期类型标识")
  private String cycleTypeCode;

  /**
   * 周期类型实例标识
   */
  @TableField(value = "cycle_type_instance_code")
  @Schema(description = "周期类型实例标识")
  private String cycleTypeInstanceCode;

  /**
   * 周期类型实例简称
   */
  @TableField(value = "cycle_number_short_name")
  @Schema(description = "周期类型实例简称")
  private String cycleNumberShortName;

  /**
   * 目标达成情况
   */
  @TableField(value = "target_reached")
  @Schema(description = "目标达成情况")
  private String targetReached;

  /**
   * 目标是否达成 TRUE:是 FALSE:否
   */
  @TableField(value = "is_reached")
  @Schema(description = "目标是否达成")
  private String isReached;

  /**
   * 目标周期进展状态 NOT_AT_THE:未开始 ONGOING:进行中 HAS_ENDED:已结束
   */
  @TableField(value = "task_status")
  @NotNull(message = "目标周期进展状态不能为空")
  @Schema(description = "目标周期进展状态")
  private String taskStatus;

  /**
   * 总时长
   */
  @TableField(value = "total_length")
  @Schema(description = "总时长")
  private Long totalLength;

  /**
   * 剩余天数
   */
  @TableField(value = "delay_surplus_length")
  @Schema(description = "剩余天数")
  private Long delaySurplusLength;

  /**
   * 完成偏离时长
   */
  @TableField(value = "deviate_length")
  @Schema(description = "完成偏离时长")
  private Long deviateLength;

  /**
   * 冗余业务场景标识配置项
   */
  @TableField(value = "biz_scene_code")
  @NotNull(message = "冗余业务场景标识配置项不能为空")
  @Schema(description = "冗余业务场景标识配置项")
  private String bizSceneCode;

  /**
   * 冗余评价主题类型配置项
   */
  @TableField(value = "evaluation_subject_type_code")
  @NotNull(message = "冗余评价主题类型配置项不能为空")
  @Schema(description = "冗余评价主题类型配置项")
  private String evaluationSubjectTypeCode;

  /**
   * 冗余规划类型 GENERAL_PLANNING:常规规划 THEMATIC_PLANNING:专题规划
   */
  @TableField(value = "planning_type")
  @NotNull(message = "冗余规划类型不能为空")
  @Schema(description = "冗余规划类型")
  private String planningType;

  /**
   * 冗余评价模板类型配置项
   */
  @TableField(value = "evaluation_template_type_code")
  @NotNull(message = "冗余评价模板类型配置项不能为空")
  @Schema(description = "冗余评价模板类型配置项")
  private String evaluationTemplateTypeCode;

  /**
   * 冗余目标ID
   */
  @TableField(value = "target_id")
  @NotNull(message = "冗余目标ID不能为空")
  @Schema(description = "冗余目标ID")
  private String targetId;

  /**
   * 冗余评价模板ID
   */
  @TableField(value = "evaluation_template_id")
  @NotNull(message = "冗余评价模板ID不能为空")
  @Schema(description = "冗余评价模板ID")
  private String evaluationTemplateId;

  /**
   * 冗余评价画像ID
   */
  @TableField(value = "evaluation_portrait_id")
  @Schema(description = "冗余评价画像ID")
  private String evaluationPortraitId;

  /**
   * 冗余评价主题ID
   */
  @TableField(value = "evaluation_subject_id")
  @NotNull(message = "冗余评价主题ID不能为空")
  @Schema(description = "冗余评价主题ID")
  private String evaluationSubjectId;

  /**
   * 批次标识
   */
  @TableField(value = "batch_code")
  @NotNull(message = "批次标识不能为空")
  @Schema(description = "批次标识")
  private String batchCode;

  /**
   * 创建于批次标识
   */
  @TableField(value = "create_batch_code")
  @Schema(description = "创建于批次标识")
  private String createBatchCode;

  /**
   * 批次开始时间
   */
  @TableField(value = "batch_start_time")
  @Schema(description = "批次开始时间")
  private Date batchStartTime;

  /**
   * 批次结束时间
   */
  @TableField(value = "batch_endt_time")
  @NotNull(message = "批次结束时间不能为空")
  @Schema(description = "批次结束时间")
  private Date batchEndtTime;

  /**
   * 批次下是否更新 TRUE:是 FALSE:否
   */
  @TableField(value = "is_update")
  @NotNull(message = "批次下是否更新不能为空")
  @Schema(description = "批次下是否更新")
  private String isUpdate;

  /**
   * 批次下更新状态 NEW:本次新增 UNCHANGED:正常未变 REVISION:本次修订 ARCHIVE:本次存档
   */
  @TableField(value = "update_status")
  @NotNull(message = "批次下更新状态不能为空")
  @Schema(description = "批次下更新状态")
  private String updateStatus;

  /**
   * 存档类型 NOT_ARCHIVE:未归档 TOBE_ARCHIVING:想归档 ARCHIVED:已归档
   */
  @TableField(value = "archivng_type")
  @NotNull(message = "存档类型不能为空")
  @Schema(description = "存档类型")
  private String archivngType;

  /**
   * 是否未来 TRUE:是 FALSE:否
   */
  @TableField(value = "is_editing")
  @NotNull(message = "是否未来不能为空")
  @Schema(description = "是否未来")
  private String isEditing;

  /**
   * 是否存档 TRUE:是 FALSE:否
   */
  @TableField(value = "is_archive")
  @NotNull(message = "是否存档不能为空")
  @Schema(description = "是否存档")
  private String isArchive;

  /**
   * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
   */
  @TableField(value = "subject_life_cycle")
  @NotNull(message = "主体生命周期不能为空")
  @Schema(description = "主体生命周期")
  private String subjectLifeCycle;

  /**
   * 操作人就职记录ID
   */
  @TableField(value = "operation_induction_id")
  @NotNull(message = "操作人就职记录ID不能为空")
  @Schema(description = "操作人就职记录ID")
  private String operationInductionId;

  /**
   * 创建人就职记录ID
   */
  @TableField(value = "create_induction_id")
  @NotNull(message = "创建人就职记录ID 不能为空")
  @Schema(description = "创建人就职记录ID ")
  private String createInductionId;

  /**
   * 发布人就职记录ID
   */
  @TableField(value = "release_induction_id")
  @Schema(description = "发布人就职记录ID")
  private String releaseInductionId;

  /**
   * 存档人就职记录ID
   */
  @TableField(value = "archive_induction_id")
  @Schema(description = "存档人就职记录ID")
  private String archiveInductionId;

  /**
   * 操作时间
   */
  @TableField(value = "operate_time")
  @NotNull(message = "操作时间不能为空")
  @Schema(description = "操作时间")
  private Date operateTime;

  /**
   * 创建时间
   */
  @TableField(value = "create_time")
  @NotNull(message = "创建时间不能为空")
  @Schema(description = "创建时间")
  private Date createTime;

  /**
   * 发布时间
   */
  @TableField(value = "release_time")
  @Schema(description = "发布时间")
  private Date releaseTime;

  /**
   * 存档时间
   */
  @TableField(value = "archive_time")
  @Schema(description = "存档时间")
  private Date archiveTime;

  /**
   * 是否作废 TRUE:是 FALSE:否
   */
  @TableField(value = "is_valid")
  @NotNull(message = "是否作废不能为空")
  @Schema(description = "是否作废")
  private String isValid;

  /**
   * 创建于空间ID
   */
  @TableField(value = "space_id")
  @NotNull(message = "创建于空间ID不能为空")
  @Schema(description = "创建于空间ID")
  private String spaceId;

  /**
   * 创建于联盟应用ID
   */
  @TableField(value = "app_id")
  @NotNull(message = "创建于联盟应用ID不能为空")
  @Schema(description = "创建于联盟应用ID")
  private String appId;
}
